package com.coolingme.demo.transparent;

/**
 * 课程抽象根节点
 *
 * @author wangyue
 * @date 2020-09-19 0:19
 */
public abstract class CourseComponent {

    /**
     * 添加课程
     *
     * @param component 课程节点
     * @return 是否成功
     */
    public boolean addCourse(CourseComponent component) {
        throw new UnsupportedOperationException("addCourse not support");
    }

    /**
     * 删除课程
     *
     * @param component 课程节点
     * @return 是否成功
     */
    public boolean removeCourse(CourseComponent component) {
        throw new UnsupportedOperationException("removeCourse not support");
    }

    /**
     * 获取课程名称
     *
     * @param component 课程节点
     * @return 课程名称
     */
    public String getName(CourseComponent component) {
        throw new UnsupportedOperationException("getName not support");
    }

    /**
     * 获取课程价格
     *
     * @param component 课程节点
     * @return 课程名称
     */
    public Double getPrice(CourseComponent component) {
        throw new UnsupportedOperationException("getPrice not support");
    }

    /**
     * 输出结构信息
     */
    public void print() {
        throw new UnsupportedOperationException("print not support");
    }

}
